import http from './http.js'
import md5 from 'js-md5'

//注册
export function register(data){
    return http.post('/sso/register',data)
}
//登录
export function login(data){
    return http.post('/sso/login',data)
}
//轮播图
export function getcarouselsList(data){
    return http.post('/rotation/list',
       data
    )
}
//商品列表
export function gethotGoodsesList(data){
    return http.post('/goods/list',
       data
    )
}
//退出登录
export function logout(data){
    return http.post('/sso/logout',
       data
    )
}
//商品详情
export function getGoodsDetail(data){
    return http.post('/goods/detail',data)
}
//获取购物车列表
export function getCartList(data){
    return http.post('/cart/list/',data)
}
//添加到购物车
export function addToCart(data){
    return http.post('/cart/add/',data)
}
//编辑购物车
export function editCart(data){
    return http.post('/cart/update/',data)
}
//删除购物车
export function delCart(data){
    return http.post('/cart/delete/',data)
}
//添加收藏
export function addCollection(data){
    return http.post('/collection/add/',data)
}
//取消收藏
export function delCollection(data){
    return http.post('/collection/delete/',data)
}
//地址列表
export function getAddressList(data){
    return http.post('/consignee/list/',data)
}
//添加地址
export function addAddress(data){
    return http.post('/consignee/add/',data)
}
//删除地址
export function delAddress(data){
    return http.post('/consignee/delete/',data)
}
//编辑地址
export function editAddress(data){
    return http.post('/consignee/update/',data)
}
//创建订单
export function addOrder(data){
    return http.post('/order/add/',data)
}
//订单列表
export function getOrderList(data){
    return http.post('/order/list/',data)
}
//修改订单状态
export function editOrder(data){
    return http.post('/order/update/status',data)
}
//文章列表
export function getArticleList(data){
    return http.post('/article/list',data)
}
//添加文章
export function addArticle(data){
    return http.post('/article/add',data)
}
//我的文章
export function getMyArticle(data){
    return http.post('/article/list',data)
}
//文章详情
export function getArticleDetail(data){
    return http.post('/article/detail',data)
}
//发布评论
export function addComment(data){
    return http.post('/comment/add/',data)
}
//点赞
export function addPraise(data){
    return http.post('/praise/add',data)
}
//取消点赞
export function delPraise(data){
    return http.post('/praise/delete',data)
}
//获取用户信息
export function getUserData(data){
    return http.post('/my/info',data)
}
//修改密码
export function editPassword(data){
    return http.post('/sso/password/update',data)
}
//我的收藏
export function getMyCollection(data){
    return http.post('/collection/list/',data)
}
//我的点赞
export function getMyPraise(data){
    return http.post('/praise/list/',data)
}